-- GENERATED SPELL FOR [Magosh] --


function spell0_1399(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(913,pUnit)
pUnit:RegisterEvent('Sorts_1399', 3000, 1)
end

function spell1_1399(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1399', 3000, 1)
end

function spell2_1399(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(2606,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1399', 0, 1)
end

function Sorts_1399(pUnit, Event)
local choix_sorts_1399 = math.random(0, 2)
if choix_sorts_1399 == 0 then
pUnit:RegisterEvent('spell0_1399', 1, 1)
end
if choix_sorts_1399 == 1 then
pUnit:RegisterEvent('spell1_1399', 1, 1)
end
if choix_sorts_1399 == 2 then
pUnit:RegisterEvent('spell2_1399', 1, 1)
end
end

function mob1399_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1399', math.random(1500, 3000), 1)
end

function mob1399_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1399_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1399_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1399, 1, 'mob1399_Action')
RegisterUnitEvent(1399, 2, 'mob1399_Leave')
RegisterUnitEvent(1399, 3, 'mob1399_Kill')
RegisterUnitEvent(1399, 4, 'mob1399_Die')
